<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>新增视频</title>
	<link rel="stylesheet" type="text/css" href="/style/style.css">
	<script type="text/javascript" src="/js/validate.js"></script>
	<script type="text/javascript">
		function validate() {
			var videoTitle = document.add_video_form.videotitle;
			var videoURL = document.add_video_form.videourl;

			if(videoTitle.value == ''){
				window.alert('请输入视频标题');
				videoTitle.focus();
				return false;
			}
			if(videoURL.value == ''){
				window.alert('请输入视频地址');
				videoURL.focus();
				return false;
			}
			if(!isURL(videoURL.value)){
				window.alert('视频地址格式不正确！');
				videoURL.select();
				videoURL.focus();
				return false;
			}
			return true;
		}
	</script>
</head>
<body>
	<div id="main">
		<form name="add_video_form" method="post" action="do_add_video.jsp" onsubmit="return validate();">
			<table border="0" cellpadding="2" cellspacing="0" class="form-table">
				<tr>
					<td align="right">视频标题</td>
					<td><input type="text" name="videotitle" style="width:320px;"></td>
				</tr>
				<tr>
					<td align="right">实际地址</td>
					<td><input type="text" name="videourl" style="width:320px;"></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td align="right"><input type="submit" value="保存"></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>